import { currentUserName } from "@/utils/common.js";
import { utils } from 'hi-ui';
export default {
    id: "VipcardEntity",
    returnTotal:true,
    modelFile: "vipcard/dataset/VipcardEntity.xml",
    sortFields: [
        "FID",
        "FVIPCARD",
        "FSENDCARDPERSON",
        "FSENDCARDTIME",
        "FVIPGRADE",
        "FSTARTTIME",
        "FENDTIME",
        "FVIPSTATE",
        "FVIPPHONE",
        "FVIPNAME",
        "FVIPSEX",
        "FVIPAGE",
        "FVIPBIRTHDAY",
        "FVIPIDNUMBER",
        "FREGION",
        "FDETAILADDRESS",
        "FWECHATNUMBER",
        "FQQNUMBER",
        "FNOTE",
        "FSHOPDESC",
        "FSHOPDESCID",
        "FENTERPRISEDESC",
        "FENTERPRISEID",
        "FUSERDESC"
    ],
    fields: {
        FID: {
            name: "FID", //字段ID
            label: "ID", //字段描述
            dbtype: "dbString", //数据类型
            default: {
                //默认值
                //rule: 'first', //prior   填充规则
                exps: (data) => {
                    //填充表达式
                    return utils.string.guid();
                },
            },
        },
        FVIPCARD: {
            name: "FVIPCARD", //字段ID
            label: "会员卡号", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
            readonly: true,
            required: true,
            default: {
                //默认值
                exps: (data) => {
                    //填充表达式
                    return utils.date.format(new Date(), "yyyyMMddHHmmss");
                },
            },
        },
        FSENDCARDPERSON:{
            name: "FSENDCARDPERSON", //字段ID
            label: "发卡人1", //字段描述
            dbtype: "dbString", //数据类型
        },
        FUSERDESC: {
            name: "FUSERDESC", //字段ID
            label: "发卡人", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
            default: {
                //默认值
                exps: (data) => {
                    //填充表达式
                    return currentUserName();
                },
            },
        },
        FSENDCARDTIME: {
            name: "FSENDCARDTIME", //字段ID
            label: "发卡时间", //字段描述
            dbtype: "dbDate", //数据类型
            readonly: true,
            length: 25,
            default: {
                //默认值
                exps: (data) => {
                    //填充表达式
                    return utils.date.format(new Date(), "yyyy-MM-dd HH:mm:ss");
                },
            },
        },
        FVIPGRADE: {
            name: "FVIPGRADE", //字段ID
            label: "会员等级", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
            required: true,
        },
        FVIPGRADEID: {
            name: "FVIPGRADEID", //字段ID
            label: "会员等级ID", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
            required: true,
        },
        FSTARTTIME: {
            name: "FSTARTTIME", //字段ID
            label: "生效时间", //字段描述
            dbtype: "dbDate", //数据类型
            length: 25,
        },
        FENDTIME: {
            name: "FENDTIME", //字段ID
            label: "失效时间", //字段描述
            dbtype: "dbDate", //数据类型
            length: 25,
        },
        FVIPSTATE: {
            name: "FVIPSTATE", //字段ID
            label: "会员状态", //字段描述
            dbtype: "dbBoolean", //数据类型
            length: 25,
            required: true,
        },
        FVIPPHONE: {
            name: "FVIPPHONE", //字段ID
            label: "手机号", //字段描述
            dbtype: "dbString", //数据类型
            length: 11,
            required: true,
        },
        FVIPNAME: {
            name: "FVIPNAME", //字段ID
            label: "姓名", //字段描述
            dbtype: "dbString", //数据类型
            length: 50,
        },
        FVIPSEX: {
            name: "FVIPSEX", //字段ID
            label: "性别", //字段描述
            dbtype: "dbString", //数据类型
        },
        FVIPAGE: {
            name: "FVIPAGE", //字段ID
            label: "年龄", //字段描述
            dbtype: "dbInt", //数据类型
        },
        FVIPBIRTHDAY: {
            name: "FVIPBIRTHDAY", //字段ID
            label: "生日", //字段描述
            dbtype: "dbDate", //数据类型
        },
        FVIPIDNUMBER: {
            name: "FVIPIDNUMBER", //字段ID
            label: "身份证号", //字段描述
            dbtype: "dbString", //数据类型
            length: 50,
        },
        FREGION: {
            name: "FREGION", //字段ID
            label: "所属地区名称", //字段描述
            dbtype: "dbString", //数据类型
            length: 50,
        },
        FREGIONID: {
            name: "FREGIONID", //字段ID
            label: "所属地区", //字段描述
            dbtype: "dbString", //数据类型
            length: 50,
        },
        FDETAILADDRESS: {
            name: "FDETAILADDRESS", //字段ID
            label: "详细地址", //字段描述
            dbtype: "dbString", //数据类型
            length: 100,
        },
        FWECHATNUMBER: {
            name: "FWECHATNUMBER", //字段ID
            label: "微信号", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },
        FQQNUMBER: {
            name: "FQQNUMBER", //字段ID
            label: "QQ号", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },
        FNOTE: {
            name: "FNOTE", //字段ID
            label: "备注", //字段描述
            dbtype: "dbString", //数据类型
            length: 250,
        },
        FSHOPDESC: {
            name: "FSHOPDESC", //字段ID
            label: "店铺", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },
        FSHOPDESCID: {
            name: "FSHOPDESCID", //字段ID
            label: "店铺编号", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },
        FENTERPRISEDESC: {
            name: "FENTERPRISEDESC", //字段ID
            label: "企业名称", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },
        FENTERPRISEID: {
            name: "FENTERPRISEID", //字段ID
            label: "企业ID", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },
    }
}
